<script lang="ts" setup>

import {FileVo} from "@/dto/file/File.ts";
import {computed} from "vue";
import {ListUtil} from "@/util/ListUtil.ts";

const props = defineProps({
    modelValue: {
        type: String
    },
    width: {
        type: Number,
        default: 100
    },
    height: {
        type: Number,
        default: 100
    }
})

const urlList = computed({
    get() {
        return ListUtil.stringToList(props.modelValue ?? "")
    }, set() {

    }
})

</script>

<template>
    <el-image
            v-for="id in urlList"
            :style="'width:'+props.width+'px;height:'+props.height+'px;'"
            fit="scale-down"
            :src="FileVo.getUploadUrl(String(id))"
    />
</template>

<style scoped>

</style>